package itd.newbee.mall.newbeemall.controller;

import itd.newbee.mall.newbeemall.Dao.AdminMapper;
import itd.newbee.mall.newbeemall.entity.Admin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author Administrator
 * @version 1.0
 * @description: TODO
 * @date 2025/3/7 18:08
 */
@RestController
@RequestMapping("Admin")
public class MyBatisController {
    @Autowired
    private AdminMapper adminMapper;
    @GetMapping("insert")
    public int insert( Integer id,String name,String password ){
        Admin admin = new Admin();
        admin.setId(id);
        admin.setPassword(password);
        admin.setName(name);

       return adminMapper.insertOne(admin);
    }
}
